import Vue from 'vue'
import Vuex from 'vuex'
import user from './module/user'
Vue.use(Vuex)
export default new Vuex.Store({
	state: {
		testvuex:false,
		colorIndex: 0,
		colorList: ['#FF0000','#00FF00','#0000FF'],
		eatCoinType:{
			selected:1,
			items:[]
		}
	},
	mutations: {
		setColorIndex(state,index){
		    state.colorIndex = index
		},
		setTestTrue(state){
			state.testvuex = true
		},
		setTestFalse(state){
			state.testvuex = false
		},
	},
	getters:{
	    currentColor(state){
	        return state.colorList[state.colorIndex]
	    }
	},
	actions: {},
	modules: {
		user
	}
})


